﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="StudentEnrollCourse.aspx.cs" Inherits="UniversityManagementSystem.UI.StudentEnrollCourse" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link href="../Styles/fontStyleSheet.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="fontStyle" style="height: 900px;">
        <asp:Label ID="Label1" runat="server" Text="Registration No " 
            CssClass="labelAlignment"></asp:Label>   
        <asp:TextBox ID="regNoTextBox" runat="server" CssClass="textBoxAlignment"></asp:TextBox>
      <asp:RequiredFieldValidator ID="registrationNoRequiredFieldValidator" 
            runat="server" ControlToValidate="regNoTextBox" 
            ErrorMessage="Registration No Is Required" ForeColor="Red">*</asp:RequiredFieldValidator>
                 
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 
        <asp:Button ID="searchButton" runat="server" Text="Search" 
            onclick="searchButton_Click" CssClass="button" Width="100px" />
        <br />
        <br />   
        <asp:Label ID="Label2" runat="server" Text="Name" CssClass="labelAlignment"></asp:Label>               
        <asp:TextBox ID="nameTextBox" runat="server" ReadOnly="True" 
            CssClass="textBoxAlignment"></asp:TextBox>
           <br />
        <br /> 
       <asp:Label ID="Label4" runat="server" Text="Date" CssClass="labelAlignment"></asp:Label>                   
        <asp:TextBox ID="dateTextBox" runat="server" ReadOnly="True" 
            CssClass="textBoxAlignment"></asp:TextBox>
        <br />
        <br /> 
        <asp:Label ID="Label3" runat="server" Text="Email" CssClass="labelAlignment"></asp:Label>                  
        <asp:TextBox ID="emailTextBox" runat="server" ReadOnly="True" 
            CssClass="textBoxAlignment"></asp:TextBox>
        <br />
        <br /> 
        <asp:Label ID="Label5" runat="server" Text="Department" 
            CssClass="labelAlignment"></asp:Label>        
        <asp:TextBox ID="deptTextBox" runat="server" ReadOnly="True" 
            CssClass="textBoxAlignment"></asp:TextBox>
         
        <br />
        <br />
        <asp:Label ID="Label6" runat="server" Text="Course" CssClass="labelAlignment"></asp:Label>                
        <asp:DropDownList ID="courseDropDownList" runat="server" AutoPostBack="True" 
            onselectedindexchanged="courseDropDownList_SelectedIndexChanged" 
            CssClass="comboBoxAlignment">
        </asp:DropDownList>
         <br />
                 <br />
       
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       
        <asp:Button ID="enrollButton" runat="server" Text="Enroll" 
            onclick="enrollButton_Click" CssClass="button" Width="100px" />
               
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               
        <asp:Button ID="showAllButton" runat="server" onclick="showAllButton_Click" 
            Text="Show All Courses" CssClass="button" Width="180px" />
        <br />
        <asp:GridView ID="allCoursesGridView" runat="server" 
            AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField DataField="CourseName" HeaderText="Course Name" ReadOnly="True" 
                    SortExpression="CourseName" />
                <asp:BoundField DataField="CourseTitle" HeaderText="Course Title" 
                    ReadOnly="True" SortExpression="CourseTitle" />
                <asp:BoundField DataField="CourseCredit" HeaderText="Course Credit" 
                    ReadOnly="True" SortExpression="CourseCredit" />
                <asp:BoundField DataField="CourseDepartment" HeaderText="Course Department" 
                    ReadOnly="True" SortExpression="CourseDepartment" />
                <asp:BoundField DataField="CouresSemester" HeaderText="Course Semester" 
                    ReadOnly="True" SortExpression="CouresSemester" />
                <asp:BoundField DataField="CourseDescription" HeaderText="Course Details" 
                    ReadOnly="True" SortExpression="CourseDescription" />
            </Columns>
        </asp:GridView>
        <br />
        <asp:GridView ID="enrolledCoursesGridView" runat="server" 
            AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField DataField="CourseTitle" HeaderText="Title" ReadOnly="True" 
                    SortExpression="CourseTitle" />
                <asp:BoundField DataField="CourseName" HeaderText="Name" ReadOnly="True" 
                    SortExpression="CourseName" />
            </Columns>
        </asp:GridView>
        <br />
        <asp:Label ID="messageLabel" runat="server"></asp:Label>
        <br />
        <br />
        <asp:ValidationSummary ID="ValidationSummary" runat="server" ForeColor="Red" 
            ShowMessageBox="True" ShowSummary="False" />
        <br />
    </div>
</asp:Content>
